<?php

/**
 * Sous-Element de parsing pour les tags de la forme {$'...'...} ou {$$'...'...}
 *
 * @category   McCube
 * @package    Template\Parser
 * @author     Leiha Sellier <leiha.sellier@gmail.com>
 * @license    http://creativecommons.org/licenses/by/3.0/  CC BY 3.0
 * @link       http://code.google.com/p/mechanics-cubes/
 */
class McCube_Template_Parser_Element_String_Version1
    extends McCube_Template_Parser_Element_String_Abstract{

    /**
     *
     *
     * @param string $variable
     * @param string $inTag
     * @return string
     */
    public function build($variable, $inTag){
        $variable = '\''.$variable.'\'';
        if($inTag)
            $variable = parent::_applyFilters($variable, $inTag);

        return parent::buildPhpTag($variable);
    }
}